/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package caylus.GUI;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPanel;

/**
 *
 * @author CeZar
 */

public class DessinerDansCase extends JPanel{

    public boolean _estoccupeParUnOuvrier = false;
    private boolean _contientUneEtiquette = false ;
    private int _indice = 0 ;
    private String  _chemin ;


    public DessinerDansCase(int pIndice ,String pChemin) {
        super();
        _indice = pIndice;
        _chemin = pChemin;
    }


    public boolean contientUneEtiquette() {
        return _contientUneEtiquette;
    }

    public boolean estoccupeParUnOuvrier() {
        return _estoccupeParUnOuvrier;
    }

    public int getIndice() {
        return _indice;
    }

    public void setContientUneEtiquette(boolean pContientUneEtiquette) {
        _contientUneEtiquette = pContientUneEtiquette;
    }

    public void setEstoccupeParUnOuvrier(boolean pEstoccupeParUnOuvrier) {
        _estoccupeParUnOuvrier = pEstoccupeParUnOuvrier;
    }

    public void setIndice(int pIndice) {
        _indice = pIndice;
    }


     @Override
    public void paintComponent(Graphics gc){
        try {
            BufferedImage image;
           image = javax.imageio.ImageIO.read(new java.io.File(_chemin));
            gc.drawImage(image, 0, 0, 60, 59, this);
        }
        catch (IOException ex) {
                Logger.getLogger(DessinerDansCase.class.getName()).log(Level.SEVERE, null, ex);
            }
    }

    



}
